Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Profile Override for Non-Git Sources #135433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanvincible
Copy link

@tanvincible tanvincible commented Jan 13, 2025

PR description

This PR introduces the following updates to

  1. bootstrap.py:

    • If the profile is None and the source is non-git, the profile is automatically overridden to "dist".
    • Ensures that options like download-ci-llvm and download-rustc are not used with non-git sources. An exception is raised if these options are present in the configuration when the source is non-git.
  2. bootstrap_test.py

    • Added unit tests to verify both the profile override mechanism and the assertion for restricted options.
      These tests ensure the correct behavior for non-git sources and the handling of if-unchanged options.

r? @onur-ozkan
@rustbot T-bootstrap

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @onur-ozkan (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2025
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
Copy link
Member

Thank you for your effort!

I will be available for the review around this weekend. In the meantime please ensure the CI is green and there are no arbitrary commits (e.g., merge commit) in the PR. You may wanna check out the guideline for doing that.

@onur-ozkan onur-ozkan removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 13, 2025
@tanvincible tanvincible marked this pull request as draft January 13, 2025 14:11
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 13, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@tanvincible
Copy link
Author

tanvincible commented Jan 13, 2025

@rustbot label -A-compiletest, -A-rustc-dev-guide, -A-testsuite

@tanvincible tanvincible changed the title Add Profile Override for Non-Git Sources and Assert Restrictions on if-unchanged Options Add Profile Override for Non-Git Sources Jan 13, 2025
@rustbot rustbot removed A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 13, 2025
@tanvincible
Copy link
Author

@rustbot label -has-merge-commits

@rustbot rustbot removed the has-merge-commits PR has merge commits, merge with caution. label Jan 13, 2025
@tanvincible tanvincible force-pushed the patch-1 branch 2 times, most recently from f0692f4 to 46454a2 Compare January 19, 2025 18:14
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your help!

We can land this PR once resolving the last note and squashing commits into single one.

src/bootstrap/src/core/config/tests.rs Outdated Show resolved Hide resolved
@onur-ozkan onur-ozkan marked this pull request as ready for review January 20, 2025 07:27
@rustbot
Copy link
Collaborator

rustbot commented Jan 20, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@onur-ozkan
Copy link
Member

Thank you!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 20, 2025

📌 Commit 7d80617 has been approved by onur-ozkan

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 20, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Jan 20, 2025
Add Profile Override for Non-Git Sources

## PR description

- Fixes rust-lang#135358

This PR introduces the following updates to

1. `bootstrap.py`:
    - If the `profile` is `None` and the source is non-git, the `profile` is automatically overridden to `"dist"`.
    - Ensures that options like `download-ci-llvm` and `download-rustc` are not used with non-git sources. An exception is raised if these options are present in the configuration when the source is non-git.

2. `bootstrap_test.py`
   - Added unit tests to verify both the profile override mechanism and the assertion for restricted options.
These tests ensure the correct behavior for non-git sources and the handling of `if-unchanged` options.

r? `@onur-ozkan`
`@rustbot` T-bootstrap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building rustc-1.84.0 tarball fails with git error "fatal: --local can only be used inside a git repository"
5 participants